<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$setting.webname}-学习</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/base.css">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/home.css">
    <script type="text/javascript" src="/public/static/home/themes/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/slider.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/tab.js"></script>
</head>
<body>

<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:history.back(-1)" class="aui-navBar-item">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">我的资料</span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-sys"></i>
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="aui-download-box">
            <div class="aui-tab-box" data-ydui-tab>
                <ul class="tab-nav">
                    <li class="tab-nav-item tab-active">
                        <a href="javascript:;">视频</a>
                    </li>
                    <li class="tab-nav-item">
                        <a href="javascript:;">资料</a>
                    </li>
                </ul>
                <div class="tab-panel">
                    <div class="tab-panel-item tab-active">
                        <div class="tab-item">
                            {foreach $video as $vs}
                                <a onclick="islogin('{$vs.type}','/public/static/admin/uploads/video/{$vs.url}')" href="javascript:void(0);" class="aui-list-item">
                                    <div class="aui-list-item-hd">
                                        <img src="/public/static/home/themes/img/icon/icon-dow-000.png" alt="">
                                    </div>
                                    <div class="aui-list-item-bd">
                                        <h4>{$vs.title}</h4>
                                        <h5><i class="icon icon-kbs"></i>{$vs.create_time}</h5>
                                    </div>
                                </a>
                            {/foreach}
                        </div>
                    </div>
                    <div class="tab-panel-item">
                        <div class="tab-item">
                            {foreach $files as $vs}
                            <a onclick="islogin('{$vs.type}','/public/static/admin/uploads/video/{$vs.url}')" href="javascript:void(0);"  class="aui-list-item">
                                <div class="aui-list-item-hd">
                                    <img src="/public/static/home/themes/img/icon/icon-dow-003.png" alt="">
                                </div>
                                <div class="aui-list-item-bd">
                                    <h4>{$vs.title}</h4>
                                    <h5><i class="icon icon-kbs"></i>{$vs.create_time}</h5>
                                </div>
                            </a>
                            {/foreach}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    {include file="public/footer2"}
</section>
<script>
        function islogin(id,url) {
            var idcard= '{$user}';
            if(idcard == ''){
                alert('您还未登录！去登陆');
                location.href='/home/Login/logins';
            }else{
                /*
                * 去查下该用户是否已经报名
                * */
                $.post("{:url('Courses/isCurriculum')}",{id:id},function(data){
                    if(data ==1){
                        console.log(url);
                        location.href=url;
                    }else{
                        alert('暂未报名本课程！');
                    }
                });
            }

        }

</script>
</body>
</html>